package general;

import java.io.IOException;
import java.util.Properties;

public class LoadPropertiesUtil {

	Properties properties = null;

	public final static String CONFIG_FILE_NAME = "properties/test.properties";

	private LoadPropertiesUtil() {
		this.properties=new Properties();
		try {
			properties.load(LoadPropertiesUtil.class.getClassLoader().getResourceAsStream(CONFIG_FILE_NAME));
			
		} catch (IOException e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
	
	
	public static LoadPropertiesUtil getInstance(){
		return configurationHolder.INSTANCE;
	}
	
	public static class configurationHolder{
		private static final LoadPropertiesUtil INSTANCE= new LoadPropertiesUtil();
	}
	
	public String getProperty(String key){
		return this.properties.getProperty(key);
	}
	
	
}
